package cn.edu.scau.cmi.liyunlin.factory;

import javafx.fxml.FXML;

import javafx.scene.control.Button;

import javafx.scene.control.TextArea;

import cn.edu.scau.cmi.liyunlin.factory.*;
import cn.edu.scau.cmi.liyunlin.simpleFactoryMethod.domain.*;

public class FactoryController {
	@FXML
	private Button pork;
	@FXML
	private Button beef;
	@FXML
	private Button chicken;
	@FXML
	private TextArea output;
	
	public void porkBtn() {
		MeatFactory meatFactory = new PorkFactory();
		output.setText(output.getText() + meatFactory.toString() + "\n");
	}
	
	public void beefBtn() {
		MeatFactory meatFactory = new BeefFactory();
		output.setText(output.getText() + meatFactory.toString() + "\n");
	}
	
	public void chickenBtn() {
		MeatFactory meatFactory = new ChickenFactory();
		output.setText(output.getText() + meatFactory.toString() + "\n");
	}

}
